package com.demo.controller;

import com.demo.entity.CtHelp;
import com.demo.service.CtHelpService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import javax.annotation.Resource;
import java.util.List;

/**
 * 帮助中心(CtHelp)表控制层
 *
 * @author makejava
 * @since 2021-07-01 17:55:46
 */
@RestController
@RequestMapping("ctHelp")
public class CtHelpController {
    /**
     * 服务对象
     */
    @Resource
    private CtHelpService ctHelpService;

    /**
     * 通过主键查询单条数据
     *
     * @param hId 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public CtHelp selectOne(Integer hId) {
        return this.ctHelpService.queryById(hId);
    }
    @GetMapping("selectAll")
    public List<CtHelp> selectAll(){
        return this.ctHelpService.findAll();
    }
}
